
function xOut=abs(xIn)
  x = xIn.v;
  xOut.v = abs(x);

  d = ones(size(x));
  d(x<0) = -1;
  d(x==0) = NaN;
  xOut.d = elelmult_splastindx(d,xIn.d);
  xOut=class(xOut,'deriv1s');
